const BASE_URL = 'http://localhost:3000/api';

export const API_ENDPOINTS = {
  AUTH: {
    LOGIN: `${BASE_URL}/auth/login`,
    REGISTER: `${BASE_URL}/auth/register`,
    LOGOUT: `${BASE_URL}/auth/logout`
  },
  DRUG: {
    GET_ALL: `${BASE_URL}/drugs`,
    GET_BY_ID: (id) => `${BASE_URL}/drugs/${id}`,
    CREATE: `${BASE_URL}/drugs`,
    UPDATE: (id) => `${BASE_URL}/drugs/${id}`,
    DELETE: (id) => `${BASE_URL}/drugs/${id}`,
    UPDATE_STOCK: (id) => `${BASE_URL}/drugs/${id}/stock`
  },
  CART: {
    GET: `${BASE_URL}/cart`,
    ADD: `${BASE_URL}/cart`,
    UPDATE_QUANTITY: (drugId) => `${BASE_URL}/cart/${drugId}`,
    REMOVE: (drugId) => `${BASE_URL}/cart/${drugId}`,
    CLEAR: `${BASE_URL}/cart`,
    COUNT: `${BASE_URL}/cart/count`,
    CHECKOUT: `${BASE_URL}/cart/checkout`
  },
  ORDER: {
    GET_USER_ORDERS: `${BASE_URL}/orders/user`,
    GET_ALL: `${BASE_URL}/orders`,
    GET_BY_ID: (id) => `${BASE_URL}/orders/${id}`,
    CREATE: `${BASE_URL}/orders`,
    UPDATE: (id) => `${BASE_URL}/orders/${id}`,
    UPDATE_STATUS: (id) => `${BASE_URL}/orders/${id}/status`,
    DELETE: (id) => `${BASE_URL}/orders/${id}`
  },
  USER: {
    GET_ALL: `${BASE_URL}/users`,
    GET_BY_ID: (id) => `${BASE_URL}/users/${id}`,
    CREATE: `${BASE_URL}/users`,
    UPDATE: (id) => `${BASE_URL}/users/${id}`,
    UPDATE_STATUS: (id) => `${BASE_URL}/users/${id}/status`,
    DELETE: (id) => `${BASE_URL}/users/${id}`
  },
  STATS: {
    GET_ALL: `${BASE_URL}/admin/dashboard`
  },
  ADMIN: {
    DASHBOARD: `${BASE_URL}/admin/dashboard`,
    ORDERS: `${BASE_URL}/admin/orders`,
    USERS: `${BASE_URL}/admin/users`,
    DRUGS: `${BASE_URL}/admin/drugs`
  }
}; 